package ro.gateway.aida.obj;

/**
 * <p>Title: Romanian AIDA</p>
 * <p>Description: :D application</p>
 * <p>Copyright: Copyright (comparator) 2003</p>
 * <p>Company: Romania Development Gateway </p>
 *
 * @author Mihai Popoaei, mihai_popoaei@yahoo.com, smike@intellisource.ro
 * @version 1.0-* @version $Id: AIDABasicObject.java,v 1.2 2005/07/20 12:04:18 mihaipostelnicu Exp $
 */
public class AIDABasicObject {
	protected long id = -1;
	protected byte objectType;
	protected long origin = -1;
	protected long user_id = -1;
	protected String originDbKey;
	protected long date_modif;
	protected long harvest_date;
	protected long harvest_org = -1;

	public AIDABasicObject() {
	}

	public void setUser_id(long user_id) {
		this.user_id = user_id;
	}

	public long getUser_id() {
		return user_id;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setObjectType(byte objectType) {
		this.objectType = objectType;
	}

	public byte getObjectType() {
		return objectType;
	}

	public void setOrigin(long origin) {
		this.origin = origin;
	}

	public long getOrigin() {
		return origin;
	}

	public void setOriginDbKey(String originDbKey) {
		this.originDbKey = originDbKey;
	}

	public String getOriginDbKey() {
		return originDbKey;
	}

	public void setDate_modif(long date_modif) {
		this.date_modif = date_modif;
	}

	public long getDate_modif() {
		return date_modif;
	}

	public void setHarvest_date(long harvest_date) {
		this.harvest_date = harvest_date;
	}

	public long getHarvest_date() {
		return harvest_date;
	}

	public void setHarvest_org(long harvest_org) {
		this.harvest_org = harvest_org;
	}

	public long getHarvest_org() {
		return harvest_org;
	}

	public boolean hasId() {
		return -1 != this.id;
	}

	public Object clone() {
		AIDABasicObject result = new AIDABasicObject();
		result.populate(this);
		return result;
	}

	public void populate(AIDABasicObject source_item) {
		this.date_modif = source_item.date_modif;
		this.user_id = source_item.user_id;
		this.objectType = source_item.objectType;
		this.origin = source_item.origin;
		this.originDbKey = source_item.originDbKey;
		this.harvest_date = source_item.harvest_date;
		this.harvest_org = source_item.harvest_org;
		this.id = source_item.id;
	}

	public static final byte TYPE_ACTIVITY = 0;
	// persons, organizations involved
	public static final byte TYPE_ORGANIZATION_INVOLVED = 10;
	public static final byte TYPE_PERSON_INVOLVED = 11;
	// generic properties
	public static final byte TYPE_GENERIC_UNKNOWN = 1;
	public static final byte TYPE_TITLE = 12;
	public static final byte TYPE_EXT_REASON = 13;
	public static final byte TYPE_DESCRIPTION = 14;
	public static final byte TYPE_OBJECTIVE = 15;
	public static final byte TYPE_RESULT = 16;
	public static final byte TYPE_STATUS = 17;
	public static final byte TYPE_KEYWORDS = 18;
	public static final byte TYPE_COMPONENT = 19;
	public static final byte TYPE_BENEFICIARIES_COMMENT = 30;
	public static final byte TYPE_NOTE_FIELD_1 = 50;
	public static final byte TYPE_NOTE_FIELD_2 = 51;
	public static final byte TYPE_NOTE_FIELD_3 = 52;
	public static final byte TYPE_NOTE_FIELD_4 = 53;
	// other properties
	public static final byte TYPE_SECTOR = 20;
	public static final byte TYPE_DOCUMENT = 21;
	public static final byte TYPE_RESOURCE = 22;
	public static final byte TYPE_LOCATION = 23;
	public static final byte TYPE_FUNDING_BYCAT = 24;
	public static final byte TYPE_FUNDING_YEARLY = 25;
	public static final byte TYPE_FUNDING = 26;
}
